<?xml version="1.0" encoding="UTF-8"?>
<html filename="docs/SAXHelpers/TLocatorImpl.html">
<body>
<a id="#top"/>
<h1>
	                Class Summary : TLocatorImpl </h1> Provide an optional convenience implementation of Locator.

 <blockquote>
 <em>This module, both source code and documentation, is in the
 Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
 </blockquote>

 <p>This class is available mainly for application writers, who
 can use it to make a persistent snapshot of a locator at any
 point during a document parse:</p>

 <pre>
  TMyHandler = class(TInterfacedObject, IContentHandler)
    Flocator : ILocator;
    Fstartloc : ILocator;
    [...]
  end;

  procedure TMyHandler.setDocumentLocator(const locator: ILocator);
  begin
    // note the locator
    Flocator:= locator;
  end;

  procedure startDocument();
  begin
    // save the location of the start of the document
    // for future use.
    Fstartloc:= TLocatorImpl.Create(locator) as ILocator;
  end;
</pre>

 <p>Normally, parser writers will not use this class, since it
 is more efficient to provide location information only when
 requested, rather than constantly updating a Locator object.</p>

<br/><b>Since : </b> SAX 1.0
<br/><b>See : </b> <a href="../SAX/ILocator.html">ILocator</a>
<h2>
	              Methods
	            </h2>
<div style="padding-left:10px">
<a href="#getPublicId">
	                  function
	                 getPublicId() : PSAXChar</a>
<br/>
<a href="#getSystemId">
	                  function
	                 getSystemId() : PSAXChar</a>
<br/>
<a href="#getLineNumber">
	                  function
	                 getLineNumber() : Integer</a>
<br/>
<a href="#getColumnNumber">
	                  function
	                 getColumnNumber() : Integer</a>
<br/>
<a href="#setPublicId">
	                  procedure
	                 setPublicId(PSAXChar)</a>
<br/>
<a href="#setSystemId">
	                  procedure
	                 setSystemId(PSAXChar)</a>
<br/>
<a href="#setLineNumber">
	                  procedure
	                 setLineNumber(Integer)</a>
<br/>
<a href="#setColumnNumber">
	                  procedure
	                 setColumnNumber(Integer)</a>
<br/>
</div>
<br/>
<hr width="100%"/>
<a name="#getPublicId">
<p>
<b>function</b> getPublicId() : PSAXChar; </p>
</a> Return the saved public identifier.

<br/><b>Result : </b> The public identifier as a string, or an empty string if none
         is available.
<br/><b>See : </b> <a href="../SAX/ILocator.html#getPublicId">ILocator.getPublicId</a>
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#setPublicId">TLocatorImpl.setPublicId</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getSystemId">
<p>
<b>function</b> getSystemId() : PSAXChar; </p>
</a> Return the saved system identifier.

<br/><b>Result : </b> The system identifier as a string, or an empty string if none
         is available.
<br/><b>See : </b> <a href="../SAX/ILocator.html#getSystemId">ILocator.getSystemId</a>
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#setSystemId">TLocatorImpl.setSystemId</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getLineNumber">
<p>
<b>function</b> getLineNumber() : Integer; </p>
</a> Return the saved line number (1-based).

<br/><b>Result : </b> The line number as an integer, or -1 if none is available.
<br/><b>See : </b> <a href="../SAX/ILocator.html#getLineNumber">ILocator.getLineNumber</a>
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#setLineNumber">TLocatorImpl.setLineNumber</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#getColumnNumber">
<p>
<b>function</b> getColumnNumber() : Integer; </p>
</a> Return the saved column number (1-based).

<br/><b>Result : </b> The column number as an integer, or -1 if none is available.
<br/><b>See : </b> <a href="../SAX/ILocator.html#getColumnNumber">ILocator.getColumnNumber</a>
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#setColumnNumber">TLocatorImpl.setColumnNumber</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setPublicId">
<p>
<b>procedure</b> setPublicId( publicId : PSAXChar); </p>
</a> Set the public identifier for this locator.

<br/><b>Parameter : </b> publicId The new public identifier, or an empty string
        if none is available.
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#getPublicId">TLocatorImpl.getPublicId</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setSystemId">
<p>
<b>procedure</b> setSystemId( systemId : PSAXChar); </p>
</a> Set the system identifier for this locator.

<br/><b>Parameter : </b> systemId The new system identifier, or an empty string
        if none is available.
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#getSystemId">TLocatorImpl.getSystemId</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setLineNumber">
<p>
<b>procedure</b> setLineNumber( lineNumber : Integer); </p>
</a> Set the line number for this locator (1-based).

<br/><b>Parameter : </b> lineNumber The line number, or -1 if none is available.
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#getLineNumber">TLocatorImpl.getLineNumber</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
<hr width="100%"/>
<a name="#setColumnNumber">
<p>
<b>procedure</b> setColumnNumber( columnNumber : Integer); </p>
</a> Set the column number for this locator (1-based).

<br/><b>Parameter : </b> columnNumber The column number, or -1 if none is available.
<br/><b>See : </b> <a href="../SAXHelpers/TLocatorImpl.html#getColumnNumber">TLocatorImpl.getColumnNumber</a>
<br/>
<p>
<a href="#top">Top</a>
</p>
</body>
</html>